<?xml version="1.0"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
  <display-name>Jena RDF Server</display-name>
  <context-param>
    <param-name>org.ids-adi.config-uri</param-name>
    <param-value>joseki-config.ttl#system</param-value>
  </context-param>
  <!-- FILTERS -->
  <filter>
    <filter-name>ids-adi-sandbox-update</filter-name>
    <filter-class>org.ids_adi.servlet.update.UpdateFilter</filter-class>
    <init-param>
      <param-name>model-name</param-name>
      <param-value>iring</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>ids-adi-sandbox-update</filter-name>
    <url-pattern>/iring</url-pattern>
  </filter-mapping>
  
  <!-- SERVLETS -->
  <!-- The Joseki SPARQL servlet -->
  <servlet>
    <servlet-name>SPARQL service processor</servlet-name>
    <servlet-class>org.joseki.http.Servlet</servlet-class>
    <!-- Configuration file -->
    <init-param>
      <param-name>org.joseki.rdfserver.config</param-name>
      <param-value>joseki-config.ttl</param-value>
    </init-param>
  </servlet>
  <!-- Validator -->
  <servlet>
    <servlet-name>Validator</servlet-name>
    <servlet-class>
      org.joseki.validator.Validator
    </servlet-class>
  </servlet>
  <!-- Well-known servlets for testing -->
  <servlet>
    <servlet-name>Dumper</servlet-name>
    <servlet-class>
      org.joseki.servlets.DumpServlet
    </servlet-class>
  </servlet>
  <servlet>
    <servlet-name>DumpBody</servlet-name>
    <servlet-class>
      org.joseki.servlets.DumpBodyServlet
    </servlet-class>
  </servlet>
  <!-- MAPPINGS -->
  <!-- Map URLs to SPARQL service processors -->
  <!-- Rules:
       /sparql
       Anything starting /sparql/
       Anything starting /service/
       Warning: using /* for Joseki services
       means that the welcome page is not handled.
       Nor other mappings like /*.html, unless explicitly enumerated.
  -->
  <!-- Demo service -->
  <servlet-mapping>
    <servlet-name>SPARQL service processor</servlet-name>
    <url-pattern>/iring</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>SPARQL service processor</servlet-name>
    <url-pattern>/sparql</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>SPARQL service processor</servlet-name>
    <url-pattern>/sparql/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>SPARQL service processor</servlet-name>
    <url-pattern>/service/*</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Validator</servlet-name>
    <url-pattern>/validator</url-pattern>
  </servlet-mapping>
<!--
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/index.html</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/xml-to-html.xsl</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/query.html</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>default</servlet-name>
    <url-pattern>/robots.txt</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>Dumper</servlet-name>
    <url-pattern>/dump</url-pattern>
  </servlet-mapping>
-->
  <servlet-mapping>
    <servlet-name>DumpBody</servlet-name>
    <url-pattern>/dump-body</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <!-- SECURIY -->
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>Joseki</web-resource-name>
      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
      <!-- <http-method>OPTIONS</http-method> -->
    </web-resource-collection>
  </security-constraint>
</web-app>
